//
//  PYMediaInfo.m
//  IHome
//
//  Created by Jim on 2019/4/13.
//  Copyright © 2019 com.zhujizheng. All rights reserved.
//

#import "PYMediaInfo.h"

@implementation PYMediaInfo

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.options = YYWebImageOptionSetImageWithFadeAnimation | YYWebImageOptionProgressiveBlur;
    }
    return self;
}

+ (instancetype)infoWithImgUrl:(NSString *)imgUrl
{
    PYMediaInfo *mediaInfo = [[self alloc] init];
    mediaInfo.type = PYFileTypeImage;
    mediaInfo.imgUrl = imgUrl;
    return mediaInfo;
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"<%@: %p> {type: %ld, imgUrl: %@, options: %ld, orientation: %ld, asset: %@, assetTag: %ld, imgSize: %@, placeholderImg: %@, imgViewFrame: %@, imgViewCornerRadius: %f, videoUrl = %@}",[self class], self, (long)self.type, self.imgUrl, self.options, (long)self.orientation, self.asset, self.assetTag, NSStringFromCGSize(self.imgSize), self.placeholderImg, NSStringFromCGRect(self.imgViewFrame), self.imgViewCornerRadius, self.videoUrl];
}
@end
